#pragma once

#ifndef GUINEST_H
#define GUINEST_H
//#include <vector>
#include "GUINestInterface.h"
#include "GUIBase.h"
#include <iostream>
#include <qdebug.h>
#include <stdlib.h>

class Part;

enum NestColor
{
	NestColor_Yellow,
	NestColor_Purple,
	NestColor_Green,
	NestColor_Red,
};

/**
 * @class	GUINest
 *
 * @brief	Graphical user interface nest.
 *
 * @author	Ben White
 */

class GUINest : public GUINestInterface, public GUIBase
{
public:
	GUINest(int x, int y, NestColor nestColor);
	Part* PartsInNest[3][3];
	Part* getPart(void);
	void Start();
	void Stop();
	void setPurge(bool purge);
	void togglePurge();
	bool givePart(Part* P);
	void setBroken(bool isBroken);
	void DoBreak();
	void DoFix();
	int NumberOfParts;

private:
	bool Running;
	bool Broken;
	bool Purging;
	int Capacity;//represents the maximum number of parts that can fit in the lane
	int PartSize;
	int PartsIn1;
	int PartsIn2;
	int PartsIn3;
	void advance(int phase);
	void PurgePart(Part* P);

};

#endif